<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // for (let i = 0; i < 10; i++) {
        //     console.log(i);
        //     for (let n = 0; n < i; n++) {
        //         document.write("*");
        //     }
        //     document.write("<br/>");
        // }

        for (let i = 1; i < 5; i++) {
            for (let n = 5 - i; n > 0; n--) {
                document.write(`<span>*</span>`);
            }
            for (let m = i * 2 - 1; m > 0; m--) {
                document.write("*");
            }
            document.write("<br/>");
        }

    </script>
</body>

</html>